package 拓展题目;

import java.util.LinkedList;

public class test {
    public static void main(String[] args) {

        Ab ab = new Ab("test");

        LinkedList<Ab> list = new LinkedList();

        list.addLast(ab);

        for (Ab ab1 : list) {
            System.out.println(ab1.name);
        }
    }
}

class Ab {
    String name ;

    public Ab(String name) {
        this.name = name;
    }
}
